Electronic devices have become increasingly popular in recent years. Electronic devices may include, for example, personal digital assistants (PDAs), cellular telephones, portable media players, digital cameras, or personal computers. Such electronic devices are typically microprocessor based, equipped with one or more operating systems, and frequently include one or more types of memory resources such as volatile and non-volatile memories. Although extremely useful, electronic devices often come with related disadvantages, including limited computing power, limited memory resources, and a finite power life. Power life may depend not only on the type and/or size of battery used in a particular device, but also on particular power management and memory management systems utilized in an electronic device.
Conventionally, computer memory is managed in blocks and segments. A memory block may refer to a partition of memory, wherein given a specific memory device, a memory block size is fixed. A memory segment may refer to a partition of memory having an unfixed size that may, depending on the system hardware, be dynamically generated and allocated for use by a computer program or application. A memory segment starts at a given physical memory address and has a certain partition length. For example, each memory block within a computer system may include a plurality of memory segments or one memory segment may be spread out over multiple memory blocks.
Applications, such as a user application or an operating system application, need memory resources to execute or store data. Since memory resources in an electronic device are limited, memory segments are allocated to each application as the application requires. Embedded processors, as well as other processors, generally use a memory manager to manage memory resources. When an application needs additional memory resources, the application makes a memory allocation request to the memory manager. Thereafter, the memory manager locates a segment of free memory that is typically larger than that of the request, and allocates the requested memory to the application. When the application is finished, or the application no longer needs the memory, the application informs the memory manager that the memory segment may be de-allocated. In response, the memory manager then places the memory segment back in the memory pool where it becomes available for a future allocation.
Volatile memories, such as dynamic random access memories (DRAMs) or static random access memories (SRAMs), are commonly used in electronic devices. Unlike non-volatile memories, volatile memories need continuous refreshing and, thus, require power for maintaining data stored in the memory. However, in portable electronic devices, such as PDAs, cellular telephones, laptops and other portable computing devices, it is desirable to reduce power consumption as much as possible to maximize the available “on time” for the electronic device. Therefore, some memory devices, such as low power DRAMs and cellular random access memories (CRAMs) may include partial array refresh (PAR) functionality. PAR is a hardware feature that may allow for the disablement of the refresh functionality of particular memory blocks. Using a PAR implementation, only memory blocks containing data are refreshed. Memory blocks that do not contain data are not refreshed and, as a result, power consumption of the memory device may be reduced. Currently, PAR is a complex hardware feature that is not automatically compatible with existing commercial operating systems.
FIG. 1 illustrates a conventional system memory 110 within an electronic device. As known in the art, system memory 110 may include system resources, such as a code area 102, a stack area 104, and a system heap 106. System heap 106 includes all of the unallocated memory segments within system memory 110 that remain after an operating system 112 has been initialized. System memory 110 also includes a memory allocation manager 114 and a memory allocation table 116, both of which may be configured as modules of operating system 112. Memory allocation manager 114 may control system heap 106 and may allocate memory segments within system heap 106 for use by an application in order to perform a task. Upon completion of a task, memory allocation manager 114 may de-allocate the memory segment used for the task and the de-allocated memory segment may ten be returned to system heap 106. In order to track and assist in the allocation and de-allocation of memory resources, memory allocation table 116 may include a listing of the memory blocks within a memory device, all existing memory segments, the size of each memory segment, the starting address, and the status of the memory segments, such as “available” or “in use.” In a conventional system memory, memory allocation manager 114 has no knowledge of the memory blocks within a memory device and, therefore, memory allocation manager 114 cannot enable or disable a memory block's refresh functionality. As a result, each memory block within the memory device, independent of whether the memory block includes allocated memory segments, remains “on” at all times during operation of the electronic device and, therefore, continuously consumes power whether or not the memory block is being utilized.
FIG. 2 illustrates a conventional memory management system 200 within an electronic device. Memory management system 200 includes one or more application programs 204, operating system 112, memory allocation manager 114, memory allocation table 116, and memory devices 206. As mentioned above, memory allocation table 116 includes an entry for each memory block and memory segment within memory devices 206. Furthermore, in order for memory allocation table 116 to provide the starting address, size, and status of each memory segment, each memory segment entry in memory allocation table 116 may be dynamically mapped (shown by arrows 210) to one or more physical memory segments (206(1) . . . (206(n)) within memory devices 206. Although memory devices 206 may include PAR functionality, conventional memory management system 200 is not automatically compatible with a PAR feature and, therefore, all memory blocks within memory devices 206 remain active at all times.
During operation of conventional memory management system 200, at least one application of application programs 204 may initiate a system call to memory allocation manager 114 to acquire additional memory resources from system heap 106 (see FIG. 1). Upon receiving the system call for memory acquisition, memory allocation manager 114 may search allocation table 116 to find a memory portion to satisfy the memory request. Upon finding a memory portion, memory allocation manager 114 allocates available memory segments to the application requesting the memory resources. Additionally, at least one application of application programs 204 may initiate a system call to memory allocation manager 114 to release memory segments being utilized by the application. Upon receiving the memory release system call, memory allocation manager 114 may de-allocate the memory segments from the application and the memory segments may be returned to system heap 106.
There is a need for methods, systems, and devices to enhance the memory management of an electronic device, such as to allow for enhanced power savings. Specifically, there is a need for a memory management system that is compatible with currently available operating systems and which may allow for the reduction of power consumption by activating and deactivating memory blocks dependent on whether the memory blocks are being utilized by an electronic device.